export const useCoreStore = defineStore("Core", () => {
  const { on } = useEventBusStore();

  const init = async () => {
    on(async (eventName: ValueOf<typeof EventMap>, payload?: any) => {
      switch (eventName) {
        case EventMap.test:
          console.log("全局事件总线搭建完成", payload);
          break;
        case EventMap.test2:
          console.log("全局事件总线搭建完成2222", payload);
          break;
      }
    });
  };
  return { init };
});
